<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" href="favicon.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>启程租车</title>
    <link rel="stylesheet" href="/static/css/loading.css" />
  </head>
  <body>
    <div id="app">
      <div class="first-loading-wrp">
        <div class="loading-wrp">
          <i class="splash__item" style="--i: 0.1s"></i>
          <i class="splash__item" style="--i: 0.2s"></i>
          <i class="splash__item" style="--i: 0.3s"></i>
          <i class="splash__item" style="--i: 0.4s"></i>
          <i class="splash__item" style="--i: 0.5s"></i>
          <i class="splash__item" style="--i: 0.6s"></i>
          <i class="splash__item" style="--i: 0.7s"></i>
          <i class="splash__item" style="--i: 0.8s"></i>
        </div>
        <h2>努力加载中...</h2>
      </div>
    </div>
    <script>
      const ENV_URLS = {
        dev: 'http://110jp4684fi92.vicp.fun',
        test: 'https://testccms.qichengcx.com/#/',
        test02: 'https://testccms02.qichengcx.com/#/',
        pre: 'https://preccms.qichengcx.com/#/',
        prod: 'https://ccms.qichengcx.com/#/',
      }

      var url = window.location.href
      function getUrlParams2(url) {
        let urlStr = url.split('?')[1]
        const urlSearchParams = new URLSearchParams(urlStr)
        const result = Object.fromEntries(urlSearchParams.entries())
        return result
      }
      const params = getUrlParams2(url)
      let { env = 'dev', path, code, state } = params
      if (path == 'home') path = 'index/home'
      const url_params = `${path}?code=${code}&state=${state}`
      const base_url = ENV_URLS[env]

      const to_url = base_url + url_params
      console.log("🐳 > to_url:", to_url);
      // 跳转
      setTimeout(() => {
        window.location.replace(to_url);
      }, 1000);
    </script>
  </body>
</html>
<!-- http://localhost:5173/login_jump.html?env=dev&path=login&code=&state= -->
